import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        int[] socre= getSocreArry();
        for (int i = 0; i < socre.length; i++) {
            System.out.println(socre[i]);
        }
        System.out.println("最大值为："+ getmax(socre));
        getmax(socre);
    }

    public static int[] getSocreArry(){
        int[] socreArry = new int[6];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < 6;) {
            System.out.print("请输入第"+(i+1)+"个评委的分数：");
            int socre = sc.nextInt();
            if (socre >= 0 && socre <= 100){
                socreArry[i] = socre;
                i++;
            }else {
                System.out.println("输入有误请重新输入！！！");
            }
        }
        return socreArry;
    }

    public static int getmax(int[] socreArry){
        int max = 0;
        for (int i = 0; i < socreArry.length; i++) {
            if (socreArry[i] > max){
                max = socreArry[i];
            }
        }
        return max;
    }
}
